package Thread;

class MyThread5 extends Thread {
    @Override
    public void run() {
        System.out.println(this.getId() + " " + this.getName());
    }
}

public class ThreadDemo10 {
    public static void main(String[] args) throws InterruptedException {
        MyThread5 thread1 = new MyThread5();
        MyThread5 thread2 = new MyThread5();

        thread1.start();
        thread2.start();

        Thread.sleep(1000);
        System.out.println(thread1.getId() + " " + thread1.getName());
        System.out.println(thread2.getId() + " " + thread2.getName());
    }
}
